Get a descendant parent based on its type.
Parameters
- parent
- DependencyObject whose descendants are to be searched.
- allowSubclassOfType
- True if subclasses of type may be considered.
- callback
- Delegate that should be invoked when a potential match is located. Return false from the callback to indicate that the object is not a match and that the search should be continued. Otherwise return true to indicate that the specified object should be returned from the method.
Type Parameters
- T
Return Value
A descendant parent of the specified type or null if not found.
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2